﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

namespace Entity.CommonEnums
{
    /// <summary>
    /// 后台用户操作权限[将操作控制在按钮上]
    /// 1:没有任何操作权限,2:查看事件,4:添加事件,8:修改事件,16:删除事件,32:审批事件,64:设定价格事件,
    /// 128:产品下架事件,256:提交到待发布事件,512:产品发布事件,1024:修改绑定的资源
    /// </summary>
    [Flags]
    public enum UserOperatorRole
    {
        #region 通用操作权限
        /// <summary>
        /// 没有任何操作权限
        /// </summary>
        [Description("没有权限")]
        NoneAny = 1,
        /// <summary>
        /// 查看事件
        /// </summary>
        [Description("查看事件")]
        ReadEvent = 2,
        /// <summary>
        /// 添加事件
        /// </summary>
        [Description("添加事件")]
        AddEvent = 4,
        /// <summary>
        /// 修改事件
        /// </summary>
        [Description("修改事件")]
        ModifyEvent = 8,
        /// <summary>
        /// 删除事件
        /// </summary>
        [Description("删除事件")]
        DeleteEvent = 16,
        /// <summary>
        /// 显示支付方式
        /// </summary>
        [Description("显示支付方式")]
        DisPayType = 4096,
        #endregion

        #region 包的操作权限
        /// <summary>
        /// 审批事件
        /// </summary>
        [Description("审批事件")]
        ProvedEvent = 32,
        /// <summary>
        /// 设定价格
        /// </summary>
        [Description("设定价格")]
        DoPriceEvent = 64,
        /// <summary>
        /// 产品下架事件
        /// </summary>
        [Description("下架")]
        ProductDownEvent = 128,
        /// <summary>
        /// 提交到待发布事件
        /// </summary>
        [Description("待发布")]
        NotPublishEvent = 256,
        /// <summary>
        /// 产品发布事件
        /// </summary>
        [Description("发布")]
        PublishedEvent = 512,
        /// <summary>
        /// 修改包的绑定资源
        /// </summary>
        [Description("绑定资源")]
        ModifyResourceBind = 1024,
        /// <summary>
        /// 修改包的信息
        /// </summary>
        [Description("修改包信息")]
        ModifyItemInfo = 2048,
        /// <summary>
        /// 删除包
        /// </summary>
        [Description("删除包")]
        DeleteItem = 8192,
        #endregion
    }
}
